//CircularShapes.cpp
//Contains the function definitions for the CircularShapes Class

#include <math.h>
#include <iostream>
#include "CircularShapes.h"

using namespace std;

CircularShapes::CircularShapes(const float &p_X, const float &p_Y, float rad)
	:Shape(p_X, p_Y)
{
	setRadius(rad);
	setArea(rad);
	setPerimeter(rad);
	setDistance();
}

CircularShapes::CircularShapes()
{

}

void CircularShapes::setRadius(float rad)
{
	if(rad >= 0.0)
		radius = rad;
	else
		cout << "Radius must be greater than zero!";
}

float CircularShapes::getRadius() const
{
	return radius;
}

void CircularShapes::setArea(float rad)
{
	C_area = 3.14159265359 * pow(rad, 2);
}

float CircularShapes::getArea() const
{
	return C_area;
}

void CircularShapes::setPerimeter(float rad)
{
	C_perimeter = 2*3.14159265359 * rad;
}

float CircularShapes::getPerimeter() const
{
	return C_perimeter;
}

void CircularShapes::setShapeType(string shapeName)
{
	Shape::setShapeType(shapeName);
}

string CircularShapes::getShapeType()
{
	return shapeType;
}

float CircularShapes::area() const
{
	return getArea();
}

float CircularShapes::perimeter() const
{
	return getPerimeter();
}

float CircularShapes::volume() const
{
	return 0.0;
}